Dir.mkdir(RAILS_ROOT + "/app/views/js_named_routes") if not File.exist?(RAILS_ROOT + "/app/views/js_named_routes")
['/app/controllers', '/app/views/js_named_routes'].each do |dir|
  source = File.join(directory, dir)
  dest = RAILS_ROOT + dir
  FileUtils.cp_r(Dir.glob(source+'/*.*'), dest)
end unless File.exist?(RAILS_ROOT + "/app/views/js_named_routes/functions.rhtml")